{literal}
    <style type="text/css">
        .select_choix{
            width:160px;
        }
    </style>

{/literal}

<div id="main_container">
    {$oZoneHeader}
    <div class="main_content">
        {$oZoneTopMenu}
        <div class="center_content">  
            <div class="left_content"> 
                {$oZoneLeftMenu}
            </div>
    
            <div class="right_content">
               <h2>Ajout d'annonce - choix des formules</h2>
                   {assign $linkCb = LINK_PAIEMENT_CB}
                   <form action="{$linkCb}" method="post" id="form-cb" name="form-cb">
                         <div class="modePay">
                            <ul>
                               <li class="paiement-type" style ="list-style-type: none;">
                                    <!-- à commenter pour la vesion définitive-->
                                    <INPUT TYPE = hidden NAME = PBX_PAYBOX VALUE = 'https://preprod-tpeweb.paybox.com/cgi/MYchoix_pagepaiement.cgi'>
                                    <INPUT TYPE = hidden NAME = PBX_BACKUP1 VALUE = 'https://preprod-tpeweb.paybox.com/cgi/MYchoix_pagepaiement.cgi'>
                                    <INPUT TYPE = hidden NAME = PBX_BACKUP2 VALUE = 'https://preprod-tpeweb.paybox.com/cgi/MYchoix_pagepaiement.cgi'>
                                    <!-- Fin to comment-->
                                    <INPUT TYPE = hidden NAME = PBX_MODE VALUE = '1'>
                                    <INPUT TYPE = hidden NAME = PBX_SITE VALUE = '0765493'>
                                    <INPUT TYPE = hidden NAME = PBX_RANG VALUE = '01'>
                                    <INPUT TYPE = hidden NAME = PBX_IDENTIFIANT VALUE = '507127633'>
                                    <INPUT TYPE = hidden NAME = PBX_TOTAL VALUE ="" id="montant" >
                                    <INPUT TYPE = hidden NAME = PBX_DEVISE VALUE = '978'>
                                    <INPUT TYPE = hidden NAME = PBX_CMD VALUE = "3">
                                    <INPUT TYPE = hidden NAME = PBX_PORTEUR VALUE ="{$vendeur}">
                                    <INPUT TYPE = hidden NAME = PBX_RETOUR VALUE = 'montant:M;ref:R;auto:A;trans:T;'>
                                    <INPUT TYPE = hidden NAME = PBX_EFFECTUE VALUE = "effectue"  id ="effectue">
                                    <INPUT TYPE = hidden NAME = PBX_REFUSE VALUE = "{$pathregret}">
                                    <INPUT TYPE = hidden NAME = PBX_ANNULE VALUE = "{$pathregret}">
                                    <INPUT TYPE = hidden NAME = "tarif"  VALUE = "" id="tarif">
                                    <INPUT TYPE = hidden NAME = "formule"  VALUE = "" id="formule">
                                    <input type="hidden" id="urlRetour"  value="{jurl 'annonce~BoAnnonce:ajaxGetFormuleId'}" />
                                    <input type="hidden" id="urlRetourDefaut"  value="{$urlRetourDefaut}" />
                                </li>
                            </ul>
                         </div>
                                
                </form>
                <form action="{jurl 'annonce~BoAnnonce:editer'}" method="post" id="form-choix" name="form-choix">
                <input type="hidden" id="choix-form" name="choix-form" value="{$formuleSelected->id}" />
                <input type="hidden" id="prix-form"  name="prix-form" value="{$formuleSelected->prix}" />
                <input type="hidden" id="id-formule" name="id-formule" value="" />
                <input type="hidden" id="packChose" name="packChose" value="0" />
                <input type="hidden" id="tarif_norm" name="tarif_norm" value="0" />

                    <div id="formule2">
                        <div class="wrap">
                            <div class="wrap2">
                                <input type="hidden" id="choix" name="choix" value="" />
                                <input type="hidden" id="prixOption" name="prixOption" value="" />
                                <input type="hidden" id="urlUpdate"  value="{jurl 'annonce~FoAnnonceGestion:ajaxGetChoicesOptionsByFormuleId'}" />
                                <!--Debut 3 block-->
                                {foreach $formule as $itemFormule}
                                    <input type="hidden" class="selectionne" value="{if ($formuleSelected->id == $itemFormule->id)}1{else}0{/if}" />
                                    {$itemFormule->content}
                                {/foreach}

                            </div>

                        </div>
                    </div>
                    <div class="clear">&nbsp;</div>
                    <h3>Les options</h3>
                    <div id="ajListeannonce">
                        {foreach $optPrixSup->listeLibOption as $key => $val}
                            <dl class="rows">
                                 <dt><label>{$val} : </label></dt>
                                 <dd>
                                    {if sizeof($optPrixSup->listeChoix)}
                                        <select id="parution_{$key}"  class="select_choix" onchange="miditra(this.value);">
                                            <option value="">Sélectionner</option>
                                            {foreach $optPrixSup->listeChoix as $key2 => $valChoix}
                                                {if $val == $valChoix->lib_option_formule}
                                                <option  optionPrix ="{$valChoix->formch_prix}"  value="{$valChoix->formch_id}"  
                                                        {if (isset($tabChoixSelected) && (in_array($valChoix->formch_id,$tabChoixSelected)))} selected {/if}>
                                                {$valChoix->formch_libelle|escxml} {if $valChoix->formch_prix}/ {$valChoix->formch_prix}€ {/if}{if $valChoix->formch_duree}/ {$valChoix->formch_duree} {/if}
                                                </option>
                                                {/if}
                                            {/foreach}
                                        </select>
                                    {/if}
                                 </dd>
                                
                            </dl>
                        {/foreach}

                    </div>
                    <!--end formule2-->

                    <div style="border:solid 2px silver;padding:10px;margin:10px;">
                        
                        <dl class="dC1">
                            <dt><label>Parution immédiate : </label></dt>
                            <dd>
                                <select name="garantie">
                                    <option value=""></option>
                                    {foreach $garantie as $garantieItem}
                                        <option value="{$garantieItem->garantie_id}">{$garantieItem->garantie_name}</option>
                                    {/foreach}
                                </select>
                            </dd>
                        </dl>
                        <dl class="dC1">
                            <dt><label>Paiement : </label></dt>
                            <dd>
                                <select name="RefPaiement" size="1" id="RefPaiement">
                                    <option value=""></option>
                                    <option selected="" value="ch">Chèque</option>
                                    <option value="cb" id="cb">Carte Bancaire</option>
                                    <option value="md">Mandat</option>
                                    <option value="g" id="g">Gratuit</option>
                                </select>
                            </dd>
                        </dl>
                    </div>
                    </form>
                    <dl class="submit">
                        <a title="Valider" href="#" class="bt_blue" style="float:right; margin-right:10px;" id="link-form-opt"><span class="bt_blue_lft"></span><strong>Valider</strong><span class="bt_blue_r"></span></a>
                   </dl>

            </div><!-- end of right content-->
        </div>   <!--end of center content -->

        <div class="clear"></div>
    </div> <!--end of main content-->
    
    
    <div class="footer">
    </div>

</div>